//
//  ATLocal.h
//  VRBOX
//
//  Created by CoderLT on 16/4/6.
//  Copyright © 2016年 VR. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <YTKKeyValueStore/YTKKeyValueStore.h>
#import "ATUserModel.h"


FOUNDATION_EXTERN NSString * const ATUserLoginNotification;
FOUNDATION_EXTERN NSString * const ATUserLogoutNotification;
FOUNDATION_EXTERN NSString * const ATReadyForSaleNotification;
FOUNDATION_EXTERN NSString * const ATEnterpriseUpdateNotification;

@interface ATLocalSimpleModel : BaseModel
@property (nonatomic, assign) BOOL readyForSale;
@property (nonatomic, assign) BOOL isEnterprise;

@end

@interface ATLocal : NSObject
// 单例
+ (instancetype)sharedInstance;
+ (YTKKeyValueStore *)resDB;

// 用户数据缓存
+ (ATUserModel *)user;
+ (BOOL)isLogin;
+ (void)updateUser:(ATUserModel *)user;
+ (void)loginWithUser:(ATUserModel *)user;
+ (void)loginOut;

+ (ATLocalSimpleModel *)simple;
+ (void)setReadyForSale:(BOOL)readyForSale;
@property (nonatomic, assign, class) BOOL isEnterprise;
@end
